#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "shapes.h"
#include "myfirst.h"
#include "square.h"
#include "triangle.h"
#include "circle.h"
#include <QWidget>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QPushButton>
#include <QTextEdit>
#include <QMessageBox>
#include <QKeyEvent>
#include <QList>



class MainWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    void paintShape();
    int x,y;
    void mouseDoubleClickEvent(QMouseEvent *event);
    void keyPressEvent(QKeyEvent *event);
    void mousePressEvent(QMouseEvent *event);
    ~MainWindow();
private:
    Conteiner conteiner;
    QGraphicsScene *scene;
    QGraphicsView * graphicsView;
    QPushButton *squareB;
    QPushButton *triangleB;
    QPushButton *circleB;
    QPushButton *save;
    QPushButton *open;
    QList<shapes *> list;
    QPen pen;

private slots:
    void trianglePaint();
    void rectanglePaint();
    void circlePaint();
    void saveFile();
    void openFile();
};


#endif // MAINWINDOW_H
